home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / c_cpp / cwebx / extras < prev    next >
Text File  |  1995-02-13  |  5KB  |  85 lines

  1. Here are the extras that are put in the new version:
  2.  
  3. - A compatibility mode with Levy/Knuth CWEB, selectable by a `+c' argument.
  4.   This should allow you to process files written for Levy/Knuth CWEB without
  5.   any change provided they don't use C++ heavily (little has been done
  6.   here). There should no longer be problems with use of macros defined in
  7.   cwebmac.tex, since a special compatibility mode macro file cwebcmac.tex is
  8.   used instead of cwebxmac.tex that matches the cwebmac.tex format in all
  9.   aspects that are relevant to the user. There is one small exception, namely
  10.   that the macro `\PB', which is a no-op in Levy/Knuth CWEB, has been given a
  11.   non-empty definition to ensure that the code in `|...|' will be processed
  12.   correctly even if it is used in math mode. This should cause no problem
  13.   (it should even be more robust than in Levy/Knuth CWEB), except to those
  14.   who have (independently) redefined `\PB' for some other task; that
  15.   redifinition should then be modified to incorporate the function of the
  16.   cwebcmac definition as well.
  17.  
  18. - All extra's introduced in Levy/Knuth CWEB 3.0 are now also present, most of
  19.   them even outside compatibility mode. These include @s, @q, @** and @*1
  20.   etc., @h for <Preprocessor directives> (but outside compatibility mode it
  21.   is called @p because @h was already in use), @l. Module names can be
  22.   abbreviated on first occurrence, specified completely later, and they may
  23.   appear in text when enclosed in `|...|'. `@@' is allowed everywhere with
  24.   obvious interpretation (even in `@= ... @>' and `@( ... @>'). You can get
  25. p  the index and module names on separate files by setting the triple file
  26.   flag `+t' for CWEAVE.
  27.  
  28. - The output file can optionally be specified by a third file name argument.
  29.   For second argument (change file) `-' means use none, `+' means use
  30.   default.
  31.  
  32. - A mode for CTANGLE to suppress #line lines, and to preserve/reconstruct
  33.   indentation, spacing and (most) comments from the source file, to get
  34.   reasonably readable output. This can be some fun, and useful for broken
  35.   compilers/debuggers that can't handle #line, or for people who want to
  36.   practice literate programming without their boss finding out about it.
  37.   Selectable by `-l' command line argument. Also, as a service to people who
  38.   have means to automatically generate CWEB source files, the programs now
  39.   understands #line directives in the same way that C compilers do, and
  40.   adjusts its internal file name and line number accordingly.
  41.  
  42. - A directory for @i files can be specified as in Levy/Knuth CWEB either by
  43.   compiling with symbol CWEBINPUTS="/path/name/" or by an environment
  44.   variable (note the final pathname separator, necessary to make this
  45.   UNIX-independent). Similarly @h files can be found by specifying one or
  46.   more search paths; one can be compiled in by CWEBHEADERS="/path/name/", and
  47.   more can be added by command line arguments `-I/another/path/'.
  48.  
  49. - You can force to even out the number of pages before generating the table
  50.   of contents (useful if you have a two-sided printer) by specifying `+e'
  51.   to CWEAVE.
  52.  
  53. - For those who like even more compact printed output (like me), you can run
  54.   together multiple local declarations (those that follow `{' inside a
  55.   function) on the same line (if it fits), by specifying `+m' to CWEAVE. Of
  56.   course other syntax-modifiers `+a', `+f', `+u', `+w' are still present, and
  57.   the more general options `++' and `+c' also affect pretty-printing.
  58.  
  59. - Output of @f lines has been improved, especially in case the category
  60.   TeX or NULL is assigned: both the true identifier at the left hand side
  61.   is displayed (in italics) and the form the identifier takes in the printed
  62.   output (by a TeX macro).
  63.  
  64. - Some new features are somewhat restricted when not in compatibility mode,
  65.   to improve the diagnostic possibilities. (1) Characters with codes >=128
  66.   are _only_ allowed in identifiers when they have been declared via @l, so
  67.   that CTANGLE can warn about stray 8-bit characters. (2) The use of module
  68.   names within `|...|' is only allowed if they are the last token (not
  69.   counting tokens such as `@;' that are ignored by CTANGLE) before the
  70.   closing `|'; in this way CTANGLE (which is unaware of opening and closing
  71.   of `|...|') can warn if the first module name in a section is not followed
  72.   by `=' or `|', instead of assuming that when the `=' is missing it must be
  73.   inside `|...|', possibly leading to accidental loss of the module body.
  74.  
  75. - A feature that was there all along but which I forgot to advertise enough,
  76.   is that CTANGLE counts braces and parentheses in each module and macro
  77.   body; any mismatches will be reported and ``corrected''. This is quite
  78.   useful in normal practice, since if left in, the mismatches could lead to
  79.   very mysterious error messages from the compiler, where the real error
  80.   occurs way out of sight from the point it is reported. Admittedly this
  81.   feature rules out some very bad style programs, for instance using #if
  82.   #else #endif where the conditional parts have unbalanced braces. Such
  83.   programs will also utterly confuse CWEAVE's parser anyway.
  84.  
  85.